<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: contracts/eoslib/token.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">token.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="token_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="math_8hpp.html">eoslib/math.hpp</a>&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="print_8hpp.html">eoslib/print.hpp</a>&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="reflect_8hpp.html">eoslib/reflect.hpp</a>&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="asset_8hpp.html">eoslib/asset.hpp</a>&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeosio.html">eosio</a> {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <span class="keyword">template</span>&lt; <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> Code,</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;            <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> Symbol,</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;            <span class="keyword">typename</span> NumberType = <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> </div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;              &gt;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html">   27</a></span>&#160;  <span class="keyword">struct </span><a class="code" href="structeosio_1_1token.html">token</a> {</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a8caf8ba95d241c7f269ea04ca8c2c6b6">   32</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="structeosio_1_1token.html#a8caf8ba95d241c7f269ea04ca8c2c6b6">code</a>   = Code;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a7ec90460fd5a10d1d38c7033407bb52d">   33</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="structeosio_1_1token.html#a7ec90460fd5a10d1d38c7033407bb52d">symbol</a> = Symbol;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a204f5095a16b4ff9ef4d6c993111407c">   39</a></span>&#160;    <a class="code" href="structeosio_1_1token.html#a204f5095a16b4ff9ef4d6c993111407c">token</a>(){}</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a956b92cdc5c80fc527fa57eeeaebabdf">   41</a></span>&#160;    <span class="keyword">operator</span> <a class="code" href="structeosio_1_1asset.html">asset</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> <a class="code" href="structeosio_1_1asset.html">asset</a>( <a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>, Symbol ); }</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a0baef929c36bc4ffbc7289cd79379258">   43</a></span>&#160;    <a class="code" href="structeosio_1_1token.html#a0baef929c36bc4ffbc7289cd79379258">token</a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1asset.html">asset</a>&amp; a ):<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>(a.amount) {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;       <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( a.<a class="code" href="structeosio_1_1asset.html#af2958993908e4647d9101b84a0689ae3">symbol</a> == Symbol, <span class="stringliteral">&quot;attempt to construct token from asset with different symbol&quot;</span> );</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#ada4c022b0bf44ac69c357f72fc0ad2af">   52</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="structeosio_1_1token.html#ada4c022b0bf44ac69c357f72fc0ad2af">token</a>( NumberType v ):<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>(v){};</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">   58</a></span>&#160;    NumberType <a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> = 0;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a3acd37fd026c8e74ce1def7fa148a703">   67</a></span>&#160;    <a class="code" href="structeosio_1_1token.html">token</a>&amp; <a class="code" href="structeosio_1_1token.html#a3acd37fd026c8e74ce1def7fa148a703">operator-=</a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a ) {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( quantity &gt;= a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>, <span class="stringliteral">&quot;integer underflow subtracting token balance&quot;</span> );</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;      quantity -= a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a00d03465a952ef9b8a6df4ee4151a2a6">   80</a></span>&#160;    <a class="code" href="structeosio_1_1token.html">token</a>&amp; <a class="code" href="structeosio_1_1token.html#a00d03465a952ef9b8a6df4ee4151a2a6">operator+=</a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a ) {</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( quantity + a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> &gt;= a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>, <span class="stringliteral">&quot;integer overflow adding token balance&quot;</span> );</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      quantity += a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a3a4ba798d742ab3bb7c6d16a0e823ca2">   94</a></span>&#160;    <span class="keyword">inline</span> <span class="keyword">friend</span> <a class="code" href="structeosio_1_1token.html">token</a> <a class="code" href="structeosio_1_1token.html#a3a4ba798d742ab3bb7c6d16a0e823ca2">operator+</a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      <a class="code" href="structeosio_1_1token.html">token</a> result = a;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      result += b;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a9070e8ee2d1bf7cae8438fceb0efcb51">  108</a></span>&#160;    <span class="keyword">inline</span> <span class="keyword">friend</span> <a class="code" href="structeosio_1_1token.html">token</a> <a class="code" href="structeosio_1_1token.html#a9070e8ee2d1bf7cae8438fceb0efcb51">operator-</a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      <a class="code" href="structeosio_1_1token.html">token</a> result = a;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      result -= b;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a6b52167a67ce0bac1f928747ce1247fb">  121</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a6b52167a67ce0bac1f928747ce1247fb">operator &lt;= </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> &lt;= b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#acba3f114f474466a7c6c8a77b88723df">  130</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#acba3f114f474466a7c6c8a77b88723df">operator &lt;  </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> &lt;  b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#abf600f9ac9c421e3bf284577acd22547">  139</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#abf600f9ac9c421e3bf284577acd22547">operator &gt;= </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> &gt;= b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a8b91c489658673e83721c460cb922df5">  148</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a8b91c489658673e83721c460cb922df5">operator &gt;  </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> &gt;  b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#ac4ae7b7680fa4bd2c09be5c29571dd91">  157</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#ac4ae7b7680fa4bd2c09be5c29571dd91">operator == </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> == b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a688813be9dc1e8f175d19ef1ffca4f6e">  165</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a688813be9dc1e8f175d19ef1ffca4f6e">operator != </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; b ) { <span class="keywordflow">return</span> a.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a> != b.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>; }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a543f3b1ed39e748f9e940b978d5721d4">  172</a></span>&#160;    <span class="keyword">explicit</span> <span class="keyword">operator</span> bool()<span class="keyword">const </span>{ <span class="keywordflow">return</span> quantity != 0; }</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataStream&gt;</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a052de4518d1e623762edddc26e50df08">  175</a></span>&#160;    <span class="keyword">friend</span> DataStream&amp; <a class="code" href="structeosio_1_1token.html#a052de4518d1e623762edddc26e50df08">operator &lt;&lt; </a>( DataStream&amp; ds, <span class="keyword">const</span> <a class="code" href="structeosio_1_1token.html">token</a>&amp; t ){</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;       <span class="keywordflow">return</span> ds &lt;&lt; t.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    }</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataStream&gt;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="structeosio_1_1token.html#a7230d1169afe2f991e0bd87034fbb02e">  179</a></span>&#160;    <span class="keyword">friend</span> DataStream&amp; <a class="code" href="structeosio_1_1token.html#a7230d1169afe2f991e0bd87034fbb02e">operator &gt;&gt; </a>( DataStream&amp; ds, <a class="code" href="structeosio_1_1token.html">token</a>&amp; t ){</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;       <span class="keywordflow">return</span> ds &gt;&gt; t.<a class="code" href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">quantity</a>;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    }</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  };</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseToken, <span class="keyword">typename</span> QuoteToken&gt;</div><div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="structeosio_1_1price__ratio.html">  188</a></span>&#160;  <span class="keyword">struct </span><a class="code" href="structeosio_1_1price__ratio.html">price_ratio</a> {</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="structeosio_1_1price__ratio.html#a77ab8f418d30073d087563fb9ea5110e">  189</a></span>&#160;     BaseToken   <a class="code" href="structeosio_1_1price__ratio.html#a77ab8f418d30073d087563fb9ea5110e">base</a>;</div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="structeosio_1_1price__ratio.html#ab7327aaf88b15c5f1c6adb7c4de680d4">  190</a></span>&#160;     QuoteToken  <a class="code" href="structeosio_1_1price__ratio.html#ab7327aaf88b15c5f1c6adb7c4de680d4">quote</a>;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  };</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  </div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseToken, <span class="keyword">typename</span> QuoteToken&gt;</div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html">  234</a></span>&#160;  <span class="keyword">struct </span><a class="code" href="structeosio_1_1price.html">price</a></div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  {</div><div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a50171d60c92837867ed507a247d8a550">  236</a></span>&#160;    <span class="keyword">typedef</span> BaseToken  <a class="code" href="structeosio_1_1price.html#a50171d60c92837867ed507a247d8a550">base_token_type</a>;</div><div class="line"><a name="l00237"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#aef7d0e4f45187d59ebc40b0d91a1d358">  237</a></span>&#160;    <span class="keyword">typedef</span> QuoteToken <a class="code" href="structeosio_1_1price.html#aef7d0e4f45187d59ebc40b0d91a1d358">quote_token_type</a>;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a01dc6757f6bb9bcc27593791631fc56f">  245</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> precision = 1000ll*1000ll*1000ll*1000ll*1000ll;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a1883a4c7ea7945e3b9adc6e0ad935fa6">  252</a></span>&#160;    <a class="code" href="structeosio_1_1price.html#a1883a4c7ea7945e3b9adc6e0ad935fa6">price</a>():base_per_quote(1ul){}</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#af19e574e7316fa0cb506f433a2b266f1">  260</a></span>&#160;    <a class="code" href="structeosio_1_1price.html#af19e574e7316fa0cb506f433a2b266f1">price</a>( BaseToken base, QuoteToken quote ) {</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( base  &gt;= BaseToken(1ul), <span class="stringliteral">&quot;invalid price&quot;</span> );</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( quote &gt;= QuoteToken(1ul), <span class="stringliteral">&quot;invalid price&quot;</span> );</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;      base_per_quote = base.quantity;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;      base_per_quote *= precision;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;      base_per_quote /= quote.quantity;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a00f8a553edbab3956c82bdd37d435395">  276</a></span>&#160;    <span class="keyword">friend</span> QuoteToken operator / ( BaseToken b, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; q ) {</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;      <span class="keywordflow">return</span> QuoteToken( <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>((<a class="code" href="structeosio_1_1uint128.html">uint128</a>(b.quantity) * <a class="code" href="structeosio_1_1uint128.html">uint128</a>(precision)   / q.base_per_quote)) );</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    }</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#ab3db8af0092dbe87a5dab8505052a750">  287</a></span>&#160;    <span class="keyword">friend</span> BaseToken operator * ( <span class="keyword">const</span> QuoteToken&amp; b, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; q ) {</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;      <span class="comment">//return QuoteToken( uint64_t( mult_div_i128( b.quantity, q.base_per_quote, precision ) ) );</span></div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;      <span class="keywordflow">return</span> BaseToken( <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>((b.quantity * q.base_per_quote) / precision) );</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a9a92923bb6a379671facc88b8f33e1f8">  299</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a6b52167a67ce0bac1f928747ce1247fb">operator &lt;= </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote &lt;= b.base_per_quote; }</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#aa6a0b37090470580bca05624bd5da0a3">  308</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#acba3f114f474466a7c6c8a77b88723df">operator &lt;  </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote &lt;  b.base_per_quote; }</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#aa0f3fb89fde51f4f9b728e51b459abf6">  317</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#abf600f9ac9c421e3bf284577acd22547">operator &gt;= </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote &gt;= b.base_per_quote; }</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a1d386990660f40b6cd35f5da903b9d3e">  326</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a8b91c489658673e83721c460cb922df5">operator &gt;  </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote &gt;  b.base_per_quote; }</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#a64a97e029f909397f7e93ae9f18c0f92">  335</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#ac4ae7b7680fa4bd2c09be5c29571dd91">operator == </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote == b.base_per_quote; }</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="structeosio_1_1price.html#afb4eb2338acf95c043151f4f35b99432">  344</a></span>&#160;    <span class="keyword">friend</span> <span class="keywordtype">bool</span> <a class="code" href="structeosio_1_1token.html#a688813be9dc1e8f175d19ef1ffca4f6e">operator != </a>( <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; a, <span class="keyword">const</span> <a class="code" href="structeosio_1_1price.html">price</a>&amp; b ) { <span class="keywordflow">return</span> a.base_per_quote != b.base_per_quote; }</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <a class="code" href="structeosio_1_1uint128.html">eosio::uint128</a> base_per_quote;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;  };</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;}</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;</div><div class="ttc" id="structeosio_1_1token_html_acba3f114f474466a7c6c8a77b88723df"><div class="ttname"><a href="structeosio_1_1token.html#acba3f114f474466a7c6c8a77b88723df">eosio::token::operator&lt;</a></div><div class="ttdeci">friend bool operator&lt;(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Less than comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:130</div></div>
<div class="ttc" id="namespaceeosio_html"><div class="ttname"><a href="namespaceeosio.html">eosio</a></div><div class="ttdoc">Used to forward declare raw functions. </div><div class="ttdef"><b>Definition:</b> account.hpp:12</div></div>
<div class="ttc" id="group__systemcapi_html_gae2a6ebaf48fe7c69f847ae18f109d09a"><div class="ttname"><a href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a></div><div class="ttdeci">void assert(uint32_t test, const char *cstr)</div><div class="ttdoc">Aborts processing of this action and unwinds all pending changes. </div></div>
<div class="ttc" id="print_8hpp_html"><div class="ttname"><a href="print_8hpp.html">print.hpp</a></div></div>
<div class="ttc" id="structeosio_1_1token_html_a00d03465a952ef9b8a6df4ee4151a2a6"><div class="ttname"><a href="structeosio_1_1token.html#a00d03465a952ef9b8a6df4ee4151a2a6">eosio::token::operator+=</a></div><div class="ttdeci">token &amp; operator+=(const token &amp;a)</div><div class="ttdoc">Adds quantity of token to this object. </div><div class="ttdef"><b>Definition:</b> token.hpp:80</div></div>
<div class="ttc" id="structeosio_1_1token_html_a7230d1169afe2f991e0bd87034fbb02e"><div class="ttname"><a href="structeosio_1_1token.html#a7230d1169afe2f991e0bd87034fbb02e">eosio::token::operator&gt;&gt;</a></div><div class="ttdeci">friend DataStream &amp; operator&gt;&gt;(DataStream &amp;ds, token &amp;t)</div><div class="ttdef"><b>Definition:</b> token.hpp:179</div></div>
<div class="ttc" id="structeosio_1_1price_html"><div class="ttname"><a href="structeosio_1_1price.html">eosio::price</a></div><div class="ttdoc">Defines a fixed precision price between two tokens. </div><div class="ttdef"><b>Definition:</b> token.hpp:234</div></div>
<div class="ttc" id="structeosio_1_1price_html_a1883a4c7ea7945e3b9adc6e0ad935fa6"><div class="ttname"><a href="structeosio_1_1price.html#a1883a4c7ea7945e3b9adc6e0ad935fa6">eosio::price::price</a></div><div class="ttdeci">price()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> token.hpp:252</div></div>
<div class="ttc" id="structeosio_1_1price_html_aef7d0e4f45187d59ebc40b0d91a1d358"><div class="ttname"><a href="structeosio_1_1price.html#aef7d0e4f45187d59ebc40b0d91a1d358">eosio::price::quote_token_type</a></div><div class="ttdeci">QuoteToken quote_token_type</div><div class="ttdef"><b>Definition:</b> token.hpp:237</div></div>
<div class="ttc" id="group__types_html_gaaa5d1cd013383c889537491c3cfd9aad"><div class="ttname"><a href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a></div><div class="ttdeci">unsigned long long uint64_t</div><div class="ttdef"><b>Definition:</b> types.h:18</div></div>
<div class="ttc" id="reflect_8hpp_html"><div class="ttname"><a href="reflect_8hpp.html">reflect.hpp</a></div></div>
<div class="ttc" id="structeosio_1_1token_html"><div class="ttname"><a href="structeosio_1_1token.html">eosio::token</a></div><div class="ttdef"><b>Definition:</b> token.hpp:27</div></div>
<div class="ttc" id="structeosio_1_1token_html_abf600f9ac9c421e3bf284577acd22547"><div class="ttname"><a href="structeosio_1_1token.html#abf600f9ac9c421e3bf284577acd22547">eosio::token::operator&gt;=</a></div><div class="ttdeci">friend bool operator&gt;=(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Greater than or equal to comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:139</div></div>
<div class="ttc" id="structeosio_1_1price__ratio_html_ab7327aaf88b15c5f1c6adb7c4de680d4"><div class="ttname"><a href="structeosio_1_1price__ratio.html#ab7327aaf88b15c5f1c6adb7c4de680d4">eosio::price_ratio::quote</a></div><div class="ttdeci">QuoteToken quote</div><div class="ttdef"><b>Definition:</b> token.hpp:190</div></div>
<div class="ttc" id="structeosio_1_1token_html_a6b52167a67ce0bac1f928747ce1247fb"><div class="ttname"><a href="structeosio_1_1token.html#a6b52167a67ce0bac1f928747ce1247fb">eosio::token::operator&lt;=</a></div><div class="ttdeci">friend bool operator&lt;=(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Less than or equal to comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:121</div></div>
<div class="ttc" id="structeosio_1_1token_html_a41378f3d965a9e6a3b2c9be37c132b2f"><div class="ttname"><a href="structeosio_1_1token.html#a41378f3d965a9e6a3b2c9be37c132b2f">eosio::token::quantity</a></div><div class="ttdeci">NumberType quantity</div><div class="ttdoc">Quantity of tokens available. </div><div class="ttdef"><b>Definition:</b> token.hpp:58</div></div>
<div class="ttc" id="structeosio_1_1price_html_a50171d60c92837867ed507a247d8a550"><div class="ttname"><a href="structeosio_1_1price.html#a50171d60c92837867ed507a247d8a550">eosio::price::base_token_type</a></div><div class="ttdeci">BaseToken base_token_type</div><div class="ttdef"><b>Definition:</b> token.hpp:236</div></div>
<div class="ttc" id="structeosio_1_1token_html_a8caf8ba95d241c7f269ea04ca8c2c6b6"><div class="ttname"><a href="structeosio_1_1token.html#a8caf8ba95d241c7f269ea04ca8c2c6b6">eosio::token::code</a></div><div class="ttdeci">static const uint64_t code</div><div class="ttdoc">Type of the currency. </div><div class="ttdef"><b>Definition:</b> token.hpp:32</div></div>
<div class="ttc" id="structeosio_1_1asset_html_af2958993908e4647d9101b84a0689ae3"><div class="ttname"><a href="structeosio_1_1asset.html#af2958993908e4647d9101b84a0689ae3">eosio::asset::symbol</a></div><div class="ttdeci">symbol_name symbol</div><div class="ttdef"><b>Definition:</b> asset.hpp:28</div></div>
<div class="ttc" id="structeosio_1_1token_html_a052de4518d1e623762edddc26e50df08"><div class="ttname"><a href="structeosio_1_1token.html#a052de4518d1e623762edddc26e50df08">eosio::token::operator&lt;&lt;</a></div><div class="ttdeci">friend DataStream &amp; operator&lt;&lt;(DataStream &amp;ds, const token &amp;t)</div><div class="ttdef"><b>Definition:</b> token.hpp:175</div></div>
<div class="ttc" id="math_8hpp_html"><div class="ttname"><a href="math_8hpp.html">math.hpp</a></div></div>
<div class="ttc" id="structeosio_1_1token_html_a0baef929c36bc4ffbc7289cd79379258"><div class="ttname"><a href="structeosio_1_1token.html#a0baef929c36bc4ffbc7289cd79379258">eosio::token::token</a></div><div class="ttdeci">token(const asset &amp;a)</div><div class="ttdef"><b>Definition:</b> token.hpp:43</div></div>
<div class="ttc" id="structeosio_1_1token_html_a9070e8ee2d1bf7cae8438fceb0efcb51"><div class="ttname"><a href="structeosio_1_1token.html#a9070e8ee2d1bf7cae8438fceb0efcb51">eosio::token::operator-</a></div><div class="ttdeci">friend token operator-(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Subtracts quantity of two tokens and return a new token. </div><div class="ttdef"><b>Definition:</b> token.hpp:108</div></div>
<div class="ttc" id="asset_8hpp_html"><div class="ttname"><a href="asset_8hpp.html">asset.hpp</a></div></div>
<div class="ttc" id="structeosio_1_1token_html_a3a4ba798d742ab3bb7c6d16a0e823ca2"><div class="ttname"><a href="structeosio_1_1token.html#a3a4ba798d742ab3bb7c6d16a0e823ca2">eosio::token::operator+</a></div><div class="ttdeci">friend token operator+(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Adds quantity of two tokens and return a new token. </div><div class="ttdef"><b>Definition:</b> token.hpp:94</div></div>
<div class="ttc" id="structeosio_1_1token_html_ac4ae7b7680fa4bd2c09be5c29571dd91"><div class="ttname"><a href="structeosio_1_1token.html#ac4ae7b7680fa4bd2c09be5c29571dd91">eosio::token::operator==</a></div><div class="ttdeci">friend bool operator==(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Equality comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:157</div></div>
<div class="ttc" id="structeosio_1_1price__ratio_html_a77ab8f418d30073d087563fb9ea5110e"><div class="ttname"><a href="structeosio_1_1price__ratio.html#a77ab8f418d30073d087563fb9ea5110e">eosio::price_ratio::base</a></div><div class="ttdeci">BaseToken base</div><div class="ttdef"><b>Definition:</b> token.hpp:189</div></div>
<div class="ttc" id="structeosio_1_1uint128_html"><div class="ttname"><a href="structeosio_1_1uint128.html">eosio::uint128</a></div><div class="ttdoc">A struct that wraps uint128 integer and defines common operator overloads. </div><div class="ttdef"><b>Definition:</b> math.hpp:66</div></div>
<div class="ttc" id="structeosio_1_1asset_html"><div class="ttname"><a href="structeosio_1_1asset.html">eosio::asset</a></div><div class="ttdef"><b>Definition:</b> asset.hpp:26</div></div>
<div class="ttc" id="structeosio_1_1token_html_a688813be9dc1e8f175d19ef1ffca4f6e"><div class="ttname"><a href="structeosio_1_1token.html#a688813be9dc1e8f175d19ef1ffca4f6e">eosio::token::operator!=</a></div><div class="ttdeci">friend bool operator!=(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Inequality comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:165</div></div>
<div class="ttc" id="structeosio_1_1token_html_a8b91c489658673e83721c460cb922df5"><div class="ttname"><a href="structeosio_1_1token.html#a8b91c489658673e83721c460cb922df5">eosio::token::operator&gt;</a></div><div class="ttdeci">friend bool operator&gt;(const token &amp;a, const token &amp;b)</div><div class="ttdoc">Greater than comparison operator. </div><div class="ttdef"><b>Definition:</b> token.hpp:148</div></div>
<div class="ttc" id="structeosio_1_1token_html_a7ec90460fd5a10d1d38c7033407bb52d"><div class="ttname"><a href="structeosio_1_1token.html#a7ec90460fd5a10d1d38c7033407bb52d">eosio::token::symbol</a></div><div class="ttdeci">static const uint64_t symbol</div><div class="ttdef"><b>Definition:</b> token.hpp:33</div></div>
<div class="ttc" id="structeosio_1_1price_html_af19e574e7316fa0cb506f433a2b266f1"><div class="ttname"><a href="structeosio_1_1price.html#af19e574e7316fa0cb506f433a2b266f1">eosio::price::price</a></div><div class="ttdeci">price(BaseToken base, QuoteToken quote)</div><div class="ttdoc">Construction for price given the base token and quote token. </div><div class="ttdef"><b>Definition:</b> token.hpp:260</div></div>
<div class="ttc" id="structeosio_1_1token_html_a204f5095a16b4ff9ef4d6c993111407c"><div class="ttname"><a href="structeosio_1_1token.html#a204f5095a16b4ff9ef4d6c993111407c">eosio::token::token</a></div><div class="ttdeci">token()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> token.hpp:39</div></div>
<div class="ttc" id="structeosio_1_1token_html_a3acd37fd026c8e74ce1def7fa148a703"><div class="ttname"><a href="structeosio_1_1token.html#a3acd37fd026c8e74ce1def7fa148a703">eosio::token::operator-=</a></div><div class="ttdeci">token &amp; operator-=(const token &amp;a)</div><div class="ttdoc">Subtracts quantity of token from this object. </div><div class="ttdef"><b>Definition:</b> token.hpp:67</div></div>
<div class="ttc" id="structeosio_1_1token_html_ada4c022b0bf44ac69c357f72fc0ad2af"><div class="ttname"><a href="structeosio_1_1token.html#ada4c022b0bf44ac69c357f72fc0ad2af">eosio::token::token</a></div><div class="ttdeci">token(NumberType v)</div><div class="ttdoc">Constructor for token given quantity of tokens available. </div><div class="ttdef"><b>Definition:</b> token.hpp:52</div></div>
<div class="ttc" id="structeosio_1_1price__ratio_html"><div class="ttname"><a href="structeosio_1_1price__ratio.html">eosio::price_ratio</a></div><div class="ttdef"><b>Definition:</b> token.hpp:188</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
